package com.yzyz.utils;

/**
 * 订单状态
 * @author david.sun
 * @date 2010-7-16
 */
public enum BookStatus {
	UNDO("未处理",1),
	SUCCESS("成功",2),
	FAILED("失败",3),
	POTANTIAL("潜在客户",4);
	
	private String text;
	private int type;
	
	BookStatus(String text, int type){
		this.text = text;
		this.type = type;
	}

	public String getText() {
		return text;
	}

	public int getType() {
		return type;
	}
	
	public static BookStatus getStatus(int type){
		switch(type) {
			case 1: return UNDO;
			case 2: return SUCCESS;
			case 3: return FAILED;
			case 4: return POTANTIAL;
			default:
				return UNDO;
		}
	}
	
	
}
